import helloWorld from './hello'
helloWorld()

//resource
import imgUrl from './assets/resource.png'
const img = document.createElement('img')
console.log(imgUrl)
img.src = imgUrl
document.body.appendChild(img)

//inline
import img2Url from './assets/inline.jpg'
const img2 = document.createElement('img')
img2.style.cssText = 'width:50px;height:50px;'
img2.src = img2Url
document.body.appendChild(img2)

//source
import textUrl from './assets/index.txt'
const div = document.createElement('div')
console.log('text',textUrl,)
div.style.cssText = 'width:50px;height:50px;background:red;'
console.log(div.textContent)
div.classList.add('block-bg')
div.innerText = textUrl
document.body.appendChild(div)

//asset 
import jfif from './assets/asset.jpeg'
const img3  = document.createElement('img')
img3.style.cssText = 'width:100px;height:100px;background:blue;display:block;'
img3.src = jfif
document.body.appendChild(img3)

//!CSS 资源管理加载
import './assets/style.css'
document.body.classList.add('hello')

//lamb less 使用
import './assets/style.less'
document.body.classList.add('work')

//lamb 字体使用
const span = document.createElement('span')
span.classList.add('icon')
span.innerHTML = '&#xe668;'
document.body.appendChild(span)

//lamb xml csv 的使用
import xml from './data.xml'
import csv from './data.csv'
console.log(xml)
console.log(csv)

//toml yaml json5 使用，json是默认可处理的
import toml from './data.toml';
import yaml from './data.yaml';
import json from './data.json5';
console.log(toml.title); // output `TOML Example`
console.log(toml.owner.name); // output `Tom Preston-Werner`
console.log(yaml.title); // output `YAML Example`
console.log(yaml.owner.name); // output `Tom Preston-Werner`
console.log(json.title); // output `JSON5 Example`
console.log(json.owner.name); // output `Tom Preston-Werner`
